<template>
  <div class="orderContainer">
    <div class="titleBox">
      <div class="title">
        我的评价
      </div>
    </div>
    <div class="orderBox">
      <div class="header">
        <div
          v-for="(item, index) in statuList"
          :key="item.status"
          class="title"
          :class="{ active: tabIndex == item.status }"
          @click="selectedIndex(item, index)"
        >
          {{ item.title }}
        </div>
      </div>
    </div>
    <orderList
      :status="status"
    />
    <!-- <PageNation /> -->
  </div>
</template>

<script>
import orderList from "../../components/evaluate/list.vue";
export default {
  components: {
    orderList,
    // PageNation,
  },
  data() {
    return {
      // 订单状态 
      statuList: [
        {
          status: 0,
          title: "待评论",
        },
        {
          status: 1,
          title: "已评论",
        },
      ],
      dataList: [{}, {}, {}, {}, {}],
      tabIndex: 0,
      status: "",
      labelPosition: "right",
      pageIndex: 1,
      pageSize: 10,
    };
  },
  mounted() {
    this.status = 0
  },
  methods: {
    //选择状态
    selectedIndex(item) {
      this.status = item.status;
      this.tabIndex = item.status;
    },
  },
};
</script>

<style scoped lang="scss">
.orderContainer {
  .titleBox {
    display: flex;
    flex-direction: row;
    padding: 2.75rem 2.63rem 0 2.63rem;
    align-items: center;
    background: #fff;

    .title {
      font-size: 1.13rem;
      color: #333;
    }
  }
  .orderBox {
    background-color: #fff;
    padding: 1.31rem 1.75rem 0;
    .header {
      display: flex;
      flex-direction: row;
      // justify-content: space-between;
      align-items: center;
      border-bottom: 0.06rem solid rgba(216, 216, 216, 1);

      .title {
        cursor: pointer;
        font-size: 1.25rem;
        padding: 0.63rem 0.94rem;
        position: relative;

        .nums {
          position: absolute;
          right: -0.5rem;
          top: 0;
          width: 1.38rem;
          height: 1.38rem;
          text-align: center;
          line-height: 1.38rem;
          background: #f0406f;
          border-radius: 50%;
          color: #fff;
          font-size: 1rem;
        }

        &.active {
          color: #f0406f;
          position: relative;
          padding: 0.63rem 0.94rem;
          border-bottom: 0.31rem solid rgba(240, 64, 111, 1);
        }
      }
    }

    .searchBox {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      padding: 1.63rem 0 0;
      align-items: flex-start;

      .searchInfo {
        .el-form {
          display: flex;
          flex-direction: row;
          flex-wrap: wrap;

          > div {
            &:nth-child(2n) {
              margin-right: 0;
            }
          }
        }
      }

      .searchBtn {
        width: 3.69rem;
        font-size: 0.88rem;
        padding: 0.7rem;
        color: #fff;
        text-align: center;
        background: rgba(0, 0, 0, 1);
        border: 0px solid rgba(0, 0, 0, 1);
        border-radius: 0.2rem;
        cursor: pointer;

        &:hover {
          opacity: 0.7;
        }
      }
    }
  }
}
</style>
